package com.jvm.弱引用;

import java.util.ArrayList;
import java.util.List;

/**
 * @description:
 * @author: ywk
 * @date: 2020-11-17
 */
public class 引用为空 {
    public static void main(String[] args) {
        List list=new ArrayList(10);
        for (int i=1;i<100; i++)
        {
            Object o=new Object();
            list.add(o);
            o=null;
        }
        System.out.println(list);
    }
}
